Skip to content

Enforce discard limits on readers#790

Open
emcfarlane wants to merge 2 commits into
mainfrom
ed/limitDiscards
Open

Enforce discard limits on readers#790
emcfarlane wants to merge 2 commits into
mainfrom
ed/limitDiscards

Conversation

@emcfarlane

@emcfarlane emcfarlane commented Oct 25, 2024

Copy link
Copy Markdown
Contributor

This enforces limits on discard to avoid unbounded reads. Where resources were already exhausted no further reads are done and discards have been removed. These discards were an optimization to reuse connections. When a stream is partially read all subsequent reads will now return EOF errors to avoid reading in a corrupted state.

Fixes #620

@emcfarlane emcfarlane requested a review from jhump October 25, 2024 21:51
This enforces limits on discard to avoid unbounded reads. Where
resources were already exhausted no further reads are done and discards
have been removed. These discards were an optimization to reuse
connections. When a stream is partially read all subsequent reads will
now return EOF errors to avoid reading in a corrupted state.

Signed-off-by: Edward McFarlane <emcfarlane@buf.build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unenforced discard limits

1 participant